package com.pw.study.leetcode;

/**
 * @Desc: TODO
 * @author: future
 * @since: 2022/5/15-22:22
 */
public class $217_exist {
    public static void main(String[] args) {
        int[] nums ={1,2,3,4};
        boolean tx=test(nums);
        System.out.println("result: "+tx);

    }

    private static boolean test(int[] nums) {
        int tmp=0;
        for (int i = 0; i <nums.length-1 ; i++) {
            tmp=nums[i];
            for (int j = i+1; j <nums.length-1 ; j++) {
                if(tmp==nums[j]){
                    System.out.println(tmp+" tmp nums: "+nums[j]);
                    return true;
                }
            }
        }
        return false;
    }

}
